import request from '@/utils/request'
// var authorization = window.localStorage.getItem('token')


/////////////////***钱包管理***///

// 分页查询
export function walletList (data) {
  return request({
    url: '/wallet/list',
    method: 'post',
    params:data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 用户充值
export function addMoney (data) {
  return request({
    url: '/wallet/recharge',
    method: 'post',
    params:data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 用户退款
export function refundMoney (data) {
  return request({
    url: '/wallet/refund',
    method: 'post',
    params:data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 挂失卡片
export function lossCard (data) {
  return request({
    url: '/wallet/reportLoss',
    method: 'post',
    params:data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 解挂卡片
export function fixCard (data) {
  return request({
    url: '/wallet/unHang',
    method: 'post',
    params:data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}
/////////////////***钱包管理***///




/////////////////***钱包退款***///

// 分页查询
export function refundList (data) {
  return request({
    url: '/refund/list',
    method: 'post',
    data:data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}



/////////////////***钱包退款***///